]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dash: Resolve padding and alignment issues with dash items
authorSam Hewitt <snwh@gnome.org>
Mon, 15 Jan 2024 15:19:40 +0000 (11:49 -0330)
committerMarge Bot <marge-bot@gnome.org>
Wed, 24 Jan 2024 17:51:16 +0000 (17:51 +0000)
- revert a change to y-expand on dash items
- clean up the manual padding on dash items in stylesheet
- fix an issue with the running dot being misaligned

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7322
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3119>

data/theme/gnome-shell-sass/widgets/_dash.scss
js/ui/dash.js

index 6c6c8cd3e2992f160c8b12f06e4f4170044889a4..84c07672f68d8be4289293620376a49ba5b8a4e6 100644 (file)
@@ -7,6 +7,7 @@ $dash_placeholder_size: 32px;
 $dash_padding: $base_padding * 2;
 $dash_edge_offset: $base_margin * 3;
 $dash_border_radius: $modal_radius + $dash_padding;
+$dash_spacing: $base_margin * 0.5;
 
 // container for the dash
 #dash {
@@ -18,8 +19,8 @@ $dash_border_radius: $modal_radius + $dash_padding;
     border-radius: $dash_border_radius;
     padding-top: $dash_padding;
     padding-bottom: $dash_padding;
-    padding-left: $dash_padding - $base_margin; // subtract the margins added to .overview-tile below as padding
-    padding-right: $dash_padding - $base_margin;
+    padding-left: $dash_padding - $dash_spacing; // subtract the margins added to .overview-tile below
+    padding-right: $dash_padding - $dash_spacing;
 
     @if $contrast == 'high' {
       @include draw_hc_inset($width: 2px);
@@ -48,8 +49,8 @@ $dash_border_radius: $modal_radius + $dash_padding;
       // remove styles
       @extend %reset;
 
-      padding: $dash_padding $base_margin;
-      padding-bottom: $dash_padding + $dash_edge_offset;
+      margin: 0 $dash_spacing;
+      padding-bottom: $dash_edge_offset; // align with other items
 
       $fg:$system_fg_color;
       $bg:$dash_background_color;
@@ -68,6 +69,12 @@ $dash_border_radius: $modal_radius + $dash_padding;
       &:active .overview-icon { @include button(active, $tc:$fg, $c:$bg, $style: flat, $always_dark: true);}
       &:checked .overview-icon { @include button(checked, $tc:$fg, $c:$bg, $style: flat, $always_dark: true);}
     }
+
+    // running app dot
+    .app-grid-running-dot {
+      // manually position the dot within the dash item
+      margin-bottom: $dash_padding + $dash_edge_offset - 3px; // 3px = size of dot (5px) subtracted from its translationY from appDisplay.js
+    }
   }
 
   // separator between pinned and running apps
index dc1bd70faee1e69e5723fcc33214f563034aff65..dac2a99a7cc2fead1eb117620aa020795bb52666 100644 (file)
@@ -153,7 +153,7 @@ class DashItemContainer extends St.Widget {
         this.destroy_all_children();
 
         this.child = actor;
-        this.child.y_expand = false;
+        this.child.y_expand = true;
         this.add_child(this.child);
     }